local radius = 10
local gap = 150

function HUDPaint_crosshair()
	local ply = LocalPlayer()
	if not ply:Alive() then return end
	if (ply:InVehicle( ) or ply.InVehicle2) then
		local tick = CurTime() * 120
		local aimvector =	ply:GetCursorAimVector( )
		local gtstart = ply:GetShootPos() + aimvector * gap
		local gaptrace = util.QuickTrace(gtstart, aimvector * 15000, nil)
		local TScreenPos =  gaptrace.HitPos:ToScreen()
		for i = 1,4 do
			local ticka = tick + (360/4 * (i-1))
			local xa = math.cos(math.rad(ticka)) * radius + TScreenPos.x
			local ya = math.sin(math.rad(ticka)) * radius + TScreenPos.y
			local tickb = tick + (360/4 * i)
			local xb = math.cos(math.rad(tickb)) * radius + TScreenPos.x
			local yb = math.sin(math.rad(tickb)) * radius + TScreenPos.y
			surface.SetDrawColor(0,0,255,255)  --green
			surface.DrawLine( xa, ya, xb, yb )
		end
	end
end		
hook.Add("HUDPaint","crosshair_HUD",HUDPaint_crosshair)